
#Region "Using Directives"

Imports System
Imports System.Collections.Generic
Imports System.Text

#End Region

Namespace C4F.DevKit.Bluetooth

    Namespace ServiceAndDeviceDiscovery

        ''' <summary>
        ''' A generic exception which will be raised when the client 
        ''' application fails in the attempt to connect or disconnect from a 
        ''' service.
        ''' </summary>
        <Serializable()> _
        Public Class ServiceConnectionException
            Inherits Exception

            ''' <summary>
            ''' Initializes the Message property of the new instance to a 
            ''' system-supplied message.
            ''' </summary>
            Public Sub New()

                MyBase.New()

            End Sub

            ''' <summary>
            ''' Initializes an object of this class and sets the Message 
            ''' property to the specified error message.
            ''' </summary>
            ''' <param name="message">The message that describes the error.
            ''' </param>
            Public Sub New(ByVal message As String)

                MyBase.New(message)

            End Sub

            ''' <summary>
            ''' Initializes a new instance of the Exception class with a 
            ''' specified error message and a reference to the inner exception
            ''' that is the cause of this exception.
            ''' </summary>
            ''' <param name="message">The message that describes the error.</param>
            ''' <param name="innerException">The exception that is the cause of
            ''' this exception.</param>
            Public Sub New(ByVal message As String, ByVal innerException As Exception)

                MyBase.New(message, innerException)

            End Sub

            ''' <summary>
            ''' Initializes a new instance of this class with serialized data.   
            ''' </summary>
            ''' <param name="info">The SerializationInfo that holds the serialized
            ''' object data about the exception being thrown.</param>
            ''' <param name="context">The StreamingContext that contains contextual
            ''' information about the source or destination.</param>
            Public Sub New(ByVal info As Runtime.Serialization.SerializationInfo, _
                            ByVal context As Runtime.Serialization.StreamingContext)

                MyBase.New(info, context)

            End Sub

        End Class

    End Namespace

End Namespace
